package cn.doitedu.serde;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;

public class Test2 {
    public static void main(String[] args) throws IOException {

        Person p = new Person("张三", 175.5, 18);


        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        ObjectOutputStream objOut = new ObjectOutputStream(bout);

        objOut.writeObject(p);


        System.out.println(bout.toByteArray().length);




    }
}
